package org.hao.samples.util;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class MD5Utils {
	public static String GetMD5Code(String strObj){
		String resultString = null;
		
		try {
			resultString = new String(strObj);
			MessageDigest md = MessageDigest.getInstance("MD5");
			//md.digest()该函数返回值为存放哈希值结果的byte数组
			Object rssultStirng = byteToString(md.digest(strObj.getBytes()));
		} catch (NoSuchAlgorithmException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return resultString;
	}

	private static Object byteToString(byte[] digest) {
		// TODO Auto-generated method stub
		return null;
	}
}
